-- GENERATED SPELL FOR [Shadowforge Chanter] --


function spell0_2742(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(6066,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2742', 30000, 1)
end

function spell1_2742(pUnit, Event) --@Renew,n/a--
pUnit:FullCastSpellOnTarget(6077,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2742', 15000, 1)
end

function spell2_2742(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(15970,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2742', 11000, 1)
end

function Sorts_2742(pUnit, Event)
local choix_sorts_2742 = math.random(0, 2)
if choix_sorts_2742 == 0 then
pUnit:RegisterEvent('spell0_2742', 1, 1)
end
if choix_sorts_2742 == 1 then
pUnit:RegisterEvent('spell1_2742', 1, 1)
end
if choix_sorts_2742 == 2 then
pUnit:RegisterEvent('spell2_2742', 1, 1)
end
end

function mob2742_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2742', math.random(1500, 3000), 1)
end

function mob2742_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2742_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2742_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2742, 1, 'mob2742_Action')
RegisterUnitEvent(2742, 2, 'mob2742_Leave')
RegisterUnitEvent(2742, 3, 'mob2742_Kill')
RegisterUnitEvent(2742, 4, 'mob2742_Die')
